package com.liy.framework.web.rs.utils;

import com.liy.framework.common.extvo.ResultVO;

public class ParamValidator {

    private boolean success;
    private String message;

    private ParamValidator() {}

    private ParamValidator(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public boolean isSuccess() {
        return this.success;
    }

    public String getMessage() {
        return this.message;
    }

    public static ResultVO fail() {
        return new ResultVO(false, "操作失败！");
    }

    public static ResultVO success() {
        return new ResultVO(true, "操作成功！");
    }

    public static ResultVO fail(String message) {
        return new ResultVO(false, message);
    }

    public static ResultVO success(String message) {
        return new ResultVO(true, message);
    }
}
